Compiles the render information for an Entity to use within a RenderQueue. More...
Public Member Functions | |
EntityRenderInfo () | |
EntityRenderInfo (const EntityRenderInfo &other) | |
EntityRenderInfo (EntityRenderInfo &&other) | |
EntityRenderInfo (Mesh *mesh, Shader *shader) | |
~EntityRenderInfo () | |
EntityRenderInfoSlot * | getSlot (unsigned int index) const |
const nkMemory::BufferCast< EntityRenderInfoSlot * > & | getSlots () const |
Entity * | getParentEntity () const |
EntityRenderInfoSlot * | addSlot (const EntityRenderInfoSlot &infoSlot=EntityRenderInfoSlot()) |
void | eraseSlot (unsigned int index) |
EntityRenderInfo & | operator= (const EntityRenderInfo &other) |
EntityRenderInfo & | operator= (EntityRenderInfo &&other) |
virtual void | exportClassToTree (nkExport::Node *rootNode) override |
virtual void | importClassFromTree (nkExport::Node *rootNode) override |
![]() | |
Exportable () | |
virtual | ~Exportable () |
Compiles the render information for an Entity to use within a RenderQueue.
This class is the starting point, where all slots and lods will be provided. A high level overview of the hierarchy is as such :
Info
For the default render strategy, each slot will be questioned for the LOD to render depending on its parameters, for a given pass. It is possible to add as many slots as wanted to the information, and each can have any amount of LOD as required.
nkGraphics::EntityRenderInfo::EntityRenderInfo | ( | ) |
Default constructor.
nkGraphics::EntityRenderInfo::EntityRenderInfo | ( | const EntityRenderInfo & | other | ) |
Copy constructor.
other | The render information to copy from. |
nkGraphics::EntityRenderInfo::EntityRenderInfo | ( | EntityRenderInfo && | other | ) |
Move constructor.
other | The render information to move. |
Legacy convenience constructor. This constructor mimicks what was possible before to a certain degree, by quickly creating a slot and a LOD using both parameters provided. This LOD will be used in all cases.
mesh | The mesh to use. |
shader | The shader to use. |
nkGraphics::EntityRenderInfo::~EntityRenderInfo | ( | ) |
Destructor.
EntityRenderInfoSlot* nkGraphics::EntityRenderInfo::getSlot | ( | unsigned int | index | ) | const |
index | The index of the slot to retrieve. |
const nkMemory::BufferCast<EntityRenderInfoSlot*>& nkGraphics::EntityRenderInfo::getSlots | ( | ) | const |
Entity* nkGraphics::EntityRenderInfo::getParentEntity | ( | ) | const |
EntityRenderInfoSlot* nkGraphics::EntityRenderInfo::addSlot | ( | const EntityRenderInfoSlot & | infoSlot = EntityRenderInfoSlot() | ) |
Adds a slot to the information.
infoSlot | The slot to copy from, if required. |
void nkGraphics::EntityRenderInfo::eraseSlot | ( | unsigned int | index | ) |
Erases an existing slot.
index | The index of the slot to erase. |
EntityRenderInfo& nkGraphics::EntityRenderInfo::operator= | ( | const EntityRenderInfo & | other | ) |
Copy assignment operator.
other | The information to copy from. |
EntityRenderInfo& nkGraphics::EntityRenderInfo::operator= | ( | EntityRenderInfo && | other | ) |
Move assignment operator.
other | The information to move from. |
|
overridevirtual |
Basic exporting capabilities.
rootNode | The tree to export to. |
Implements nkExport::Exportable.
|
overridevirtual |
Basic importing capabilities.
rootNode | The tree to import from. |
Implements nkExport::Exportable.